% Time stamp for Packet
% atime: arriving source's time
% wtime: end of waiting for processing the packet's time
% ctime: end of processing the source's time
-record(timestamp, {atime=-1, wtime=-1, ctime=-1}).

% Network Packet
% event_number: the sequence number of its event, for calculating loss rate
% plength: The length of the packet
% sources: Transfering through sources
% now_source_id: The packet is in router ID?
% timestamps: The packet transfering each source's times
-record(packet, {event_number=-1,plength, sources=[], now_source_id,timestamps=[]}).

% Network Router buffer
% dest_id: the linked source id
% k: left buffer size
% rate: the link rate in unit time(by the simunation setting)
% c: The last Compeletime
-record(buffer,{dest_id, k, rate=100000000000, c=0}).

% Network Router
% Each router has many buffers
% buffers: Buffers
-record(router, {id, buffers=dict:new()}).

% Event
% type: arrive, departure
% packet: its packet for processing by event manager
-record(event, {type=arrive, packet}).
